﻿@model PInitiatives.Models.Initiative

@{
    ViewBag.Title = "Edit";
}

<h2>Edit</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.5.1.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.11.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-1.8.11.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
<link href="ajax.googleapis.com/ajax/libs/jqueryui/1.7.0/themes/base/…; rel="stylesheet" type="text/css" />
<link href="../../Content/themes/base/jquery.ui.all.css" rel="stylesheet" type="text/css" />

@if (ViewBag.message != null)
{
    @ViewBag.message
}
else
{
    using (Html.BeginForm())
    {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>ivent</legend>
        @*   UWAGA!!!
          te dane sie nie ulegna zmianie!*@
        @Html.HiddenFor(model => model.Autor)
        @Html.HiddenFor(model => model.CreateDate)
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.StartDate)
        @Html.HiddenFor(model => model.State)
        @Html.HiddenFor(model => model.Name)
        @Html.HiddenFor(model => model.Description)
        @Html.HiddenFor(model => model.Limit)
        @Html.HiddenFor(model => model.FreeResignDate)

@*        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        
        <div class="editor-label">
            @Html.LabelFor(model => model.Limit)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Limit)
            @Html.ValidationMessageFor(model => model.Limit)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.State)
        </div>
        <div class="editor-field">
            @Html.DropDownList("State")
            @Html.ValidationMessageFor(model => model.State)
        </div>*@
                       
 @*
        <div class="editor-label">
            @Html.LabelFor(model => model.StartDate)
        </div>
      <script type="text/javascript">
          $(document).ready(function () {
              $('.StartDT').datetimepicker({
               timeFormat: "hh:mm",
               dateFormat: "yy-mm-dd",
               minDate: new Date()
               })
          });
        </script>            
        <div class="editor-field">           
            @Html.TextBox("StartDate", Model.StartDate.ToString("yyyy-MM-dd HH:mm"), new { @class = "StartDT" })
            @Html.ValidationMessageFor(model => model.StartDate)
        </div>


        
        <div class="editor-label">
            @Html.LabelFor(model => model.FreeResignDate)
        </div>
      <script type="text/javascript">
          $(document).ready(function () {
              $('.FreeResignDT').datetimepicker({
                  timeFormat: "hh:mm",
                  dateFormat: "yy-mm-dd",
                  minDate: new Date()
                  })
          });
        </script>
            <div class="editor-field">           
            @Html.TextBox("FreeResignDate", Model.FreeResignDate.ToString("yyyy-MM-dd HH:mm"), new { @class = "FreeResignDT" })
            @Html.ValidationMessageFor(model => model.FreeResignDate)
        </div>*@

        <div class="editor-label">
            @Html.LabelFor(model => model.Category)
        </div>
        <div class="editor-field">
            @Html.DropDownList("Category")
            @Html.ValidationMessageFor(model => model.Category)
        </div>

        <p>
            <input type="submit" value="Save" />
        </p>
    </fieldset>
    }
}
<div>
    @Html.ActionLink("Back to List", "Index")
</div>
